package com.industrial.governance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.industrial.governance.mapper.DgQualityRuleManagementMapper;
import com.industrial.governance.domain.DgQualityRuleManagement;
import com.industrial.governance.service.IDgQualityRuleManagementService;

/**
 * 质量规则管理Service业务层处理
 *
 * @author SangGuangCan
 * @date 2024-03-01
 */
@Service
public class DgQualityRuleManagementServiceImpl implements IDgQualityRuleManagementService
{
    @Autowired
    private DgQualityRuleManagementMapper dgQualityRuleManagementMapper;

    /**
     * 查询质量规则管理
     *
     * @param baseId 质量规则管理主键
     * @return 质量规则管理
     */
    @Override
    public DgQualityRuleManagement selectDgQualityRuleManagementByBaseId(String baseId)
    {
        return dgQualityRuleManagementMapper.selectDgQualityRuleManagementByBaseId(baseId);
    }

    /**
     * 查询质量规则管理列表
     *
     * @param dgQualityRuleManagement 质量规则管理
     * @return 质量规则管理
     */
    @Override
    public List<DgQualityRuleManagement> selectDgQualityRuleManagementList(DgQualityRuleManagement dgQualityRuleManagement)
    {
        return dgQualityRuleManagementMapper.selectDgQualityRuleManagementList(dgQualityRuleManagement);
    }

    /**
     * 新增质量规则管理
     *
     * @param dgQualityRuleManagement 质量规则管理
     * @return 结果
     */
    @Override
    public int insertDgQualityRuleManagement(DgQualityRuleManagement dgQualityRuleManagement)
    {
        return dgQualityRuleManagementMapper.insertDgQualityRuleManagement(dgQualityRuleManagement);
    }

    /**
     * 修改质量规则管理
     *
     * @param dgQualityRuleManagement 质量规则管理
     * @return 结果
     */
    @Override
    public int updateDgQualityRuleManagement(DgQualityRuleManagement dgQualityRuleManagement)
    {
        return dgQualityRuleManagementMapper.updateDgQualityRuleManagement(dgQualityRuleManagement);
    }

    /**
     * 批量删除质量规则管理
     *
     * @param baseIds 需要删除的质量规则管理主键
     * @return 结果
     */
    @Override
    public int deleteDgQualityRuleManagementByBaseIds(String[] baseIds)
    {
        return dgQualityRuleManagementMapper.deleteDgQualityRuleManagementByBaseIds(baseIds);
    }

    /**
     * 删除质量规则管理信息
     *
     * @param baseId 质量规则管理主键
     * @return 结果
     */
    @Override
    public int deleteDgQualityRuleManagementByBaseId(String baseId)
    {
        return dgQualityRuleManagementMapper.deleteDgQualityRuleManagementByBaseId(baseId);
    }
}
